#ifndef EGL_WINDOW
#define EGL_WINDOW
#include "libExt/libExt.h"


namespace gengine
{
	namespace kernel
	{
struct Wind
{
	
	int width;
	int height;

	
	bool fullScreen;
	bool active;
	bool running;
};


class Window
{
public:
	Window();
	Window( const char* wndName, const char *wndClass ,int w,int h, int dep, int pixelBits,bool isFullS);
	~Window();
	
	

	void WindowSetSize(int width, int height, bool fullScreen = false);

	void WindowMainLoop();

	HDC	GetHdc() const    {	return g_hDC; }
	
	HWND GetHWnd() const { return g_hWnd; }

	void	SwapBuffer() const;
	
	const char *GetWindowName() const { return wName;}

	void	Activate()
	{
		//visible = true;
		SetActiveWindow(g_hWnd);
	}
	void Hide(){ShowWindow(g_hWnd, SW_HIDE);}

	
	void Show() { ShowWindow(g_hWnd, SW_SHOW);}
private:

	static Wind  g_window;
	const char *wndClass;
	const char *wName;
	int bitsPerPixel;
	int depthBitsPerPixel;
	HINSTANCE g_hInstance;
	HWND      g_hWnd;
	HDC       g_hDC;
	
	
protected:
bool WindowCreate(const char *title, int width, int height, bool fullScreen = false);
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
void WindowDestroy();	
};
	}
}
#endif